package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 图片引用计数对象 t_image_reference
 * 
 * @author ruoyi
 * @date 2025-01-XX
 */
public class TImageReference extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 图片文件名 */
    @Excel(name = "图片文件名")
    private String imageName;

    /** 引用次数 */
    @Excel(name = "引用次数")
    private Integer referenceCount;

    /** 最后引用时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "最后引用时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date lastReferencedAt;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setImageName(String imageName) 
    {
        this.imageName = imageName;
    }

    public String getImageName() 
    {
        return imageName;
    }
    public void setReferenceCount(Integer referenceCount) 
    {
        this.referenceCount = referenceCount;
    }

    public Integer getReferenceCount() 
    {
        return referenceCount;
    }
    public void setLastReferencedAt(Date lastReferencedAt) 
    {
        this.lastReferencedAt = lastReferencedAt;
    }

    public Date getLastReferencedAt() 
    {
        return lastReferencedAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("imageName", getImageName())
            .append("referenceCount", getReferenceCount())
            .append("lastReferencedAt", getLastReferencedAt())
            .toString();
    }
}
